-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated profdata_coverage_dir to work with Xcode 7.3 #169
Conversation
The location of Coverage.profdata changed in Xcode 7.3.
Awesome, thank you! Could you add an entry to the Changelog as well? |
Done! |
Awesome, thanks for the contribution! |
Updated profdata_coverage_dir to work with Xcode 7.3
Still doesn't work for me with Xcode 7.3:
I guess it's a separate issue, though. |
@Corristo - been getting the same message after updating to this new version for code coverage in Xcode 7.3 |
But it works flawlessly if I specify Here's my assumption: when scheme is not specified, this line slather/lib/slather/project.rb Line 120 in 36ee7ec
xctest bundle in it).
|
Maybe it is finding the old Xcode 7.2 coverage directory that is no longer used? What if you try deleting CodeCoverage and let it get regenerated on the next run? This is an example of the slather command I've been using (I always have to specify the scheme because of multiple schemes):
|
@ksuther my CI script purges build directory before every run. |
Updated profdata_coverage_dir to work with Xcode 7.3
I guess looking at the logs, my error is slightly different:
I tried running the |
If you run slather with |
@gblotter I had same issue, but after specifying scheme coverage was generated. |
I have specified the scheme from the beginning...
And I should also mention I'm LOOKING at the CodeCoverage directory created in ~/Library/Developer/Xcode/DerivedData/App/Build/Intermediates/CodeCoverage |
I just had the same issue. From what I can understand the I found two work arounds:
I am quite baffled by this, in particular by the fact that a new folder in the derived data is being created by that
|
@mokagio You're reading that correctly. Where are your real DerivedData and CodeCoverage directories being created? Are you specifying -derivedDataPath or something else when you run the tests? |
My failing attempts were on an usual setup:
This resulted in the Looking into By doing an
If I use
|
Debug. Thanks 😄 I checked out your branch and tried it. With DerivedData at
|
@mokagio What if you change this line to include -configuration Debug? https://github.com/ksuther/slather/blob/workspace-support/lib/slather/project.rb#L85 Also, are there any Xcode workspaces involved? |
@ksuther I tried that for my issue, and still got the wrong path. Setting workspace would fix my issue. |
@BrettThePark #178 will let you specify a workspace. |
Yes. I am working on figuring out how to pass the parameter in from fastlane. Hopefully #178 is merged in the near future. |
This fixes #125. profdata_coverage_dir first tries the Xcode 7.2.1 paths, then falls back to the new Xcode 7.3 path if the 7.2.1 path isn't found.
I did not update the tests in
project_spec.rb
. The expected output on lines 452 and 453 will need to be updated when the CI is moved up to Xcode 7.3.